package com.hong.qrpc.factory;

import com.hong.qrpc.constant.ProtoTypeConst;
import com.hong.qrpc.resolver.QrpcResolver;
import com.hong.qrpc.resolver.Resolver;

/**
 * @Author HQT
 * @Date 2022/8/10 11:31
 */
public class ResolverFactory {
    public static Resolver getResolver(int protocolType) {
        switch (protocolType) {
            case ProtoTypeConst.QRPC:
                return new QrpcResolver();
            default:
                throw new IllegalArgumentException("unsupported protocolType:" + protocolType);
        }
    }
}
